#!/bin/sh
ulimit -s 1024
export LD_LIBRARY_PATH=/home/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/home/app/locallib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/home/hisiko/hisilib:$LD_LIBRARY_PATH
export PATH=/home/app/localbin:$PATH
export PATH=/home/base/tools:$PATH

if [ -d "/tmp/sd/yi-hack-v5" ]; then
    /tmp/sd/yi-hack-v5/script/system.sh
else
    (  
        sleep 2
        cd /home/app
        ./dispatch &
        sleep 2
        ./rmm &
        sleep 4
        ./mp4record &
        ./cloud &
        ./p2p_tnp &
            if [[ $(cat /home/app/.camver) != "yi_dome" ]] ; then
                ./oss &
            fi
        ./watch_process &
        tcpsvd -vE 0.0.0.0 21 ftpd -w &
        telnetd &
    )
fi
